package io.github.kimmking.kkconfig.spring;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Description for this class.
 *
 * @Author : kimmking(kimmking@apache.org)
 * @create 2024/4/19 01:02
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ConfigMeta {

    private String app;
    private String ns;
    private String env;
    private String configServer;

    public String buildKey() {
        return app + "_" + ns + "_" + env;
    }

    public String toListUrl() {
        return configServer + "/list?app=" + app + "&ns=" + ns + "&env=" + env;
    }

    public String toHeartUrl() {
        return configServer + "/heart?app=" + app + "&ns=" + ns + "&env=" + env;
    }



}
